package org.maitaole.service.impl;

import org.maitaole.entity.TbCategory;
import org.maitaole.mapper.TbCategoryMapper;
import org.maitaole.service.ITbCategoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TbCategoryServiceImpl implements ITbCategoryService {

    @Resource
    private TbCategoryMapper tbCategoryMapper;

    @Override
    public List<TbCategory> getAll() {
        return tbCategoryMapper.selectList(null);
    }

    @Override
    public List<TbCategory> getAllByCategoryId() {
        return tbCategoryMapper.selectAllByCategoryId();
    }
}
